package org.yenn.pattern.aliyun.structural.facade;

import org.yenn.pattern.aliyun.service.Shape;
import org.yenn.pattern.aliyun.service.impl.Circle;
import org.yenn.pattern.aliyun.service.impl.Rectangle;
import org.yenn.pattern.aliyun.service.impl.Square;

/**
 * 步骤 3
 * 创建一个外观类。
 */
public class ShapeMaker {
    private Shape circle;
    private Shape rectangle;
    private Shape square;

    public ShapeMaker() {
        circle = new Circle();
        rectangle = new Rectangle();
        square = new Square();
    }

    public void drawCircle() {
        circle.draw();
    }

    public void drawRectangle() {
        rectangle.draw();
    }

    public void drawSquare() {
        square.draw();
    }
}
